-- 
--  User Defined Function: udf_TestConfiguration_find
--   Description: checks if an entry exists on the table TestConfiguration.
--   Parameters:
--     @name - test suite name
--   Return value: id of the entry that has the SystemInfo.Name equal to @name, or
--                 NULL if that entry can't be found.
-- 
IF EXISTS (SELECT * FROM sysobjects WHERE type = 'FN' AND name = 'udf_TestConfiguration_find')
  DROP FUNCTION udf_TestConfiguration_find
GO
CREATE FUNCTION udf_TestConfiguration_find (@name nvarchar(30))
RETURNS nvarchar(30)
AS
BEGIN
  DECLARE @ret nvarchar(30) = NULL
  SELECT @ret=Name FROM TestConfiguration WHERE Name=@name
  RETURN @ret
END
GO

